home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 2e 6e 65 72 | 2e 62 62 6e 70 6c 61 6e |news.ner|.bbnplan|
|00000030| 65 74 2e 6e 65 74 21 61 | 72 63 6f 21 75 73 65 6e |et.net!a|rco!usen|
|00000040| 65 74 0a 46 72 6f 6d 3a | 20 42 72 69 61 6e 20 4c |et.From:| Brian L|
|00000050| 65 61 63 68 20 3c 6c 61 | 73 62 66 6c 3e 0a 53 75 |each <la|sbfl>.Su|
|00000060| 62 6a 65 63 74 3a 20 52 | 65 3a 20 53 74 61 74 69 |bject: R|e: Stati|
|00000070| 63 20 4d 65 6d 62 65 72 | 20 46 75 6e 63 74 69 6f |c Member| Functio|
|00000080| 6e 73 0a 58 2d 4e 6e 74 | 70 2d 50 6f 73 74 69 6e |ns.X-Nnt|p-Postin|
|00000090| 67 2d 48 6f 73 74 3a 20 | 31 33 36 2e 32 32 36 2e |g-Host: |136.226.|
|000000a0| 31 31 36 2e 31 0a 43 6f | 6e 74 65 6e 74 2d 54 79 |116.1.Co|ntent-Ty|
|000000b0| 70 65 3a 20 74 65 78 74 | 2f 70 6c 61 69 6e 3b 20 |pe: text|/plain; |
|000000c0| 63 68 61 72 73 65 74 3d | 75 73 2d 61 73 63 69 69 |charset=|us-ascii|
|000000d0| 0a 4d 65 73 73 61 67 65 | 2d 49 44 3a 20 3c 44 6e |.Message|-ID: <Dn|
|000000e0| 36 75 48 33 2e 33 70 33 | 40 6e 65 77 73 2e 61 72 |6uH3.3p3|@news.ar|
|000000f0| 63 6f 2e 63 6f 6d 3e 0a | 54 6f 3a 20 73 6a 6c 65 |co.com>.|To: sjle|
|00000100| 65 40 69 61 73 74 61 74 | 65 2e 65 64 75 0a 53 65 |e@iastat|e.edu.Se|
|00000110| 6e 64 65 72 3a 20 75 73 | 65 6e 65 74 40 6e 65 77 |nder: us|enet@new|
|00000120| 73 2e 61 72 63 6f 2e 63 | 6f 6d 0a 43 6f 6e 74 65 |s.arco.c|om.Conte|
|00000130| 6e 74 2d 54 72 61 6e 73 | 66 65 72 2d 45 6e 63 6f |nt-Trans|fer-Enco|
|00000140| 64 69 6e 67 3a 20 37 62 | 69 74 0a 4f 72 67 61 6e |ding: 7b|it.Organ|
|00000150| 69 7a 61 74 69 6f 6e 3a | 20 41 52 43 4f 20 4f 69 |ization:| ARCO Oi|
|00000160| 6c 20 25 20 47 61 73 20 | 43 6f 6d 70 61 6e 79 0a |l % Gas |Company.|
|00000170| 52 65 66 65 72 65 6e 63 | 65 73 3a 20 3c 33 31 32 |Referenc|es: <312|
|00000180| 37 37 45 36 36 2e 36 38 | 37 46 40 69 61 73 74 61 |77E66.68|7F@iasta|
|00000190| 74 65 2e 65 64 75 3e 0a | 4d 69 6d 65 2d 56 65 72 |te.edu>.|Mime-Ver|
|000001a0| 73 69 6f 6e 3a 20 31 2e | 30 0a 44 61 74 65 3a 20 |sion: 1.|0.Date: |
|000001b0| 54 68 75 2c 20 32 32 20 | 46 65 62 20 31 39 39 36 |Thu, 22 |Feb 1996|
|000001c0| 20 31 37 3a 34 31 3a 32 | 37 20 47 4d 54 0a 58 2d | 17:41:2|7 GMT.X-|
|000001d0| 4d 61 69 6c 65 72 3a 20 | 4d 6f 7a 69 6c 6c 61 20 |Mailer: |Mozilla |
|000001e0| 31 2e 31 32 20 28 58 31 | 31 3b 20 49 3b 20 48 50 |1.12 (X1|1; I; HP|
|000001f0| 2d 55 58 20 41 2e 30 39 | 2e 30 35 20 39 30 30 30 |-UX A.09|.05 9000|
|00000200| 2f 37 35 35 29 0a 58 2d | 55 72 6c 3a 20 6e 65 77 |/755).X-|Url: new|
|00000210| 73 3a 33 31 32 37 37 45 | 36 36 2e 36 38 37 46 40 |s:31277E|66.687F@|
|00000220| 69 61 73 74 61 74 65 2e | 65 64 75 0a 0a 53 74 65 |iastate.|edu..Ste|
|00000230| 76 65 20 4c 65 65 20 3c | 73 6a 6c 65 65 40 69 61 |ve Lee <|sjlee@ia|
|00000240| 73 74 61 74 65 2e 65 64 | 75 3e 20 77 72 6f 74 65 |state.ed|u> wrote|
|00000250| 3a 0a 3e 48 69 2c 0a 3e | 0a 3e 49 20 68 61 76 65 |:.>Hi,.>|.>I have|
|00000260| 20 61 20 63 6f 75 70 6c | 65 20 6f 66 20 71 75 65 | a coupl|e of que|
|00000270| 73 74 69 6f 6e 73 20 61 | 62 6f 75 74 20 73 74 61 |stions a|bout sta|
|00000280| 74 69 63 20 6d 65 6d 62 | 65 72 20 66 75 6e 63 74 |tic memb|er funct|
|00000290| 69 6f 6e 73 2e 0a 3e 0a | 3e 31 29 20 20 49 20 77 |ions..>.|>1) I w|
|000002a0| 61 73 20 77 6f 6e 64 65 | 72 69 6e 67 20 77 68 79 |as wonde|ring why|
|000002b0| 20 43 2b 2b 20 64 6f 65 | 73 6e 27 74 20 70 72 6f | C++ doe|sn't pro|
|000002c0| 76 69 64 65 20 28 6f 72 | 20 6d 61 79 62 65 20 69 |vide (or| maybe i|
|000002d0| 74 20 64 6f 65 73 20 61 | 6e 64 20 49 20 64 6f 6e |t does a|nd I don|
|000002e0| 27 74 29 20 61 20 77 61 | 79 20 74 6f 20 70 72 6f |'t) a wa|y to pro|
|000002f0| 74 65 63 74 20 61 20 0a | 3e 73 74 61 74 69 63 20 |tect a .|>static |
|00000300| 6d 65 6d 62 65 72 20 66 | 75 6e 63 74 69 6f 6e 20 |member f|unction |
|00000310| 62 79 20 6d 61 6b 69 6e | 67 20 69 74 20 63 6f 6e |by makin|g it con|
|00000320| 73 74 61 6e 74 2e 20 20 | 57 68 61 74 20 49 20 68 |stant. |What I h|
|00000330| 61 64 20 69 6e 20 6d 69 | 6e 64 20 77 61 73 20 73 |ad in mi|nd was s|
|00000340| 6f 6d 65 74 68 69 6e 67 | 20 6c 69 6b 65 20 74 68 |omething| like th|
|00000350| 65 20 75 73 61 67 65 20 | 6f 66 20 0a 3e 63 6f 6e |e usage |of .>con|
|00000360| 73 74 20 66 6f 72 20 61 | 20 6d 65 6d 62 65 72 20 |st for a| member |
|00000370| 66 75 6e 63 74 69 6f 6e | 2e 20 20 49 20 6b 6e 6f |function|. I kno|
|00000380| 77 20 74 68 61 74 20 69 | 6e 20 74 68 69 73 20 73 |w that i|n this s|
|00000390| 65 6e 73 65 2c 20 69 74 | 20 69 73 20 6d 61 6b 69 |ense, it| is maki|
|000003a0| 6e 67 20 74 68 65 20 69 | 6d 70 6c 69 63 69 74 20 |ng the i|mplicit |
|000003b0| 76 61 72 69 61 62 6c 65 | 20 2a 74 68 69 73 20 0a |variable| *this .|
|000003c0| 3e 63 6f 6e 73 74 61 6e | 74 2c 20 61 6e 64 20 74 |>constan|t, and t|
|000003d0| 68 61 74 20 73 74 61 74 | 69 63 20 6d 65 6d 62 65 |hat stat|ic membe|
|000003e0| 72 20 66 75 6e 63 74 69 | 6f 6e 73 20 64 6f 6e 27 |r functi|ons don'|
|000003f0| 74 20 68 61 76 65 20 61 | 6e 20 69 6d 70 6c 69 63 |t have a|n implic|
|00000400| 69 74 20 2a 74 68 69 73 | 20 76 61 72 69 61 62 6c |it *this| variabl|
|00000410| 65 20 73 69 6e 63 65 20 | 74 68 65 79 20 64 6f 6e |e since |they don|
|00000420| 27 74 20 0a 3e 61 63 74 | 20 6f 6e 20 61 20 73 70 |'t .>act| on a sp|
|00000430| 65 63 69 66 69 63 20 6f | 62 6a 65 63 74 2e 20 20 |ecific o|bject. |
|00000440| 49 20 77 61 6e 74 20 74 | 6f 20 6b 6e 6f 77 20 77 |I want t|o know w|
|00000450| 68 79 20 74 68 69 73 2c | 20 6f 72 20 73 6f 6d 65 |hy this,| or some|
|00000460| 74 68 69 6e 67 20 73 69 | 6d 69 6c 61 72 20 69 73 |thing si|milar is|
|00000470| 6e 27 74 20 70 6f 73 73 | 69 62 6c 65 2e 0a 3e 0a |n't poss|ible..>.|
|00000480| 3e 63 6c 61 73 73 20 66 | 6f 6f 20 7b 0a 3e 0a 3e |>class f|oo {.>.>|
|00000490| 20 20 73 74 61 74 69 63 | 20 69 6e 74 20 47 65 74 | static| int Get|
|000004a0| 43 6f 75 6e 74 28 29 20 | 63 6f 6e 73 74 3b 0a 3e |Count() |const;.>|
|000004b0| 20 20 73 74 61 74 69 63 | 20 69 6e 74 20 63 6f 75 | static| int cou|
|000004c0| 6e 74 3b 0a 3e 7d 3b 0a | 3e 0a 3e 32 29 20 20 49 |nt;.>};.|>.>2) I|
|000004d0| 6e 20 74 68 65 20 65 78 | 61 6d 70 6c 65 20 61 62 |n the ex|ample ab|
|000004e0| 6f 76 65 2c 20 63 6f 75 | 6e 74 20 69 73 20 70 72 |ove, cou|nt is pr|
|000004f0| 69 76 61 74 65 2e 20 20 | 49 20 66 69 6e 64 20 69 |ivate. |I find i|
|00000500| 74 20 69 6e 74 65 72 65 | 73 74 69 6e 67 20 74 68 |t intere|sting th|
|00000510| 6f 75 67 68 20 74 68 61 | 74 20 61 6e 79 20 70 69 |ough tha|t any pi|
|00000520| 65 63 65 20 6f 66 20 63 | 6f 64 65 20 0a 3e 63 61 |ece of c|ode .>ca|
|00000530| 6e 20 69 6e 69 74 69 61 | 6c 69 7a 65 20 74 68 65 |n initia|lize the|
|00000540| 20 70 72 69 76 61 74 65 | 20 76 61 72 69 61 62 6c | private| variabl|
|00000550| 65 20 63 6f 75 6e 74 2e | 20 20 49 73 6e 27 74 20 |e count.| Isn't |
|00000560| 74 68 69 73 20 63 6f 6e | 74 72 61 64 69 63 74 6f |this con|tradicto|
|00000570| 72 79 3f 20 20 54 68 65 | 20 6f 6e 6c 79 20 74 68 |ry? The| only th|
|00000580| 69 6e 67 20 49 20 63 61 | 6e 20 74 68 69 6e 6b 20 |ing I ca|n think |
|00000590| 0a 3e 6f 66 20 69 73 20 | 74 68 61 74 20 74 68 65 |.>of is |that the|
|000005a0| 20 6c 69 6e 6b 65 72 20 | 6f 6e 6c 79 20 61 6c 6c | linker |only all|
|000005b0| 6f 77 73 20 69 74 20 74 | 6f 20 62 65 20 69 6e 69 |ows it t|o be ini|
|000005c0| 74 69 61 6c 69 7a 65 64 | 20 6f 6e 63 65 20 28 6f |tialized| once (o|
|000005d0| 62 76 69 6f 75 73 6c 79 | 29 2c 20 61 6e 64 20 69 |bviously|), and i|
|000005e0| 66 20 74 68 65 20 69 6d | 70 6c 65 6d 65 6e 74 6f |f the im|plemento|
|000005f0| 72 20 0a 3e 6f 66 20 74 | 68 65 20 63 6c 61 73 73 |r .>of t|he class|
|00000600| 20 69 6e 69 74 69 61 6c | 69 7a 65 73 20 69 74 2c | initial|izes it,|
|00000610| 20 74 68 65 6e 20 6e 6f | 20 75 73 65 72 73 20 77 | then no| users w|
|00000620| 69 6c 6c 20 62 65 20 61 | 62 6c 65 20 74 6f 20 77 |ill be a|ble to w|
|00000630| 69 74 68 6f 75 74 20 61 | 20 6c 69 6e 6b 65 72 20 |ithout a| linker |
|00000640| 65 72 72 6f 72 2e 0a 3e | 0a 3e 54 68 61 6e 6b 73 |error..>|.>Thanks|
|00000650| 20 69 6e 20 61 64 76 61 | 6e 63 65 2e 0a 3e 0a 3e | in adva|nce..>.>|
|00000660| 2d 2d 20 0a 3e 53 74 65 | 76 65 20 4c 65 65 0a 3e |-- .>Ste|ve Lee.>|
|00000670| 43 6f 6d 70 75 74 65 72 | 20 45 6e 67 69 6e 65 65 |Computer| Enginee|
|00000680| 72 69 6e 67 2f 43 6f 6d | 70 75 74 65 72 20 53 63 |ring/Com|puter Sc|
|00000690| 69 65 6e 63 65 0a 3e 49 | 6f 77 61 20 53 74 61 74 |ience.>I|owa Stat|
|000006a0| 65 20 55 6e 69 76 65 72 | 73 69 74 79 0a 3e 65 6d |e Univer|sity.>em|
|000006b0| 61 69 6c 20 2d 3e 20 73 | 6a 6c 65 65 40 69 61 73 |ail -> s|jlee@ias|
|000006c0| 74 61 74 65 2e 65 64 75 | 0a 3e 57 57 57 20 20 20 |tate.edu|.>WWW |
|000006d0| 2d 3e 20 68 74 74 70 3a | 2f 2f 77 77 77 2e 63 73 |-> http:|//www.cs|
|000006e0| 2e 69 61 73 74 61 74 65 | 2e 65 64 75 2f 7e 73 6a |.iastate|.edu/~sj|
|000006f0| 6c 65 65 2f 68 6f 6d 65 | 70 61 67 65 2e 68 74 6d |lee/home|page.htm|
|00000700| 6c 0a 0a 0a 53 74 65 76 | 65 2c 0a 0a 27 63 6f 6e |l...Stev|e,..'con|
|00000710| 73 74 27 20 77 68 65 6e | 20 61 73 73 6f 63 69 61 |st' when| associa|
|00000720| 74 65 64 20 77 69 74 68 | 20 66 75 6e 63 74 69 6f |ted with| functio|
|00000730| 6e 73 20 69 73 20 61 20 | 66 6c 61 67 20 77 68 69 |ns is a |flag whi|
|00000740| 63 68 20 74 65 6c 6c 73 | 20 74 68 65 20 63 6f 6d |ch tells| the com|
|00000750| 70 69 6c 65 72 0a 74 68 | 61 74 20 74 68 65 20 66 |piler.th|at the f|
|00000760| 75 6e 63 74 69 6f 6e 20 | 6d 61 79 20 62 65 20 63 |unction |may be c|
|00000770| 61 6c 6c 65 64 20 77 69 | 74 68 20 61 20 27 63 6f |alled wi|th a 'co|
|00000780| 6e 73 74 27 20 69 6e 73 | 74 61 6e 63 65 20 6f 66 |nst' ins|tance of|
|00000790| 20 74 68 65 20 6f 62 6a | 65 63 74 2e 0a 53 69 6e | the obj|ect..Sin|
|000007a0| 63 65 20 73 74 61 74 69 | 63 20 66 75 6e 63 74 69 |ce stati|c functi|
|000007b0| 6f 6e 73 20 61 72 65 20 | 6e 6f 74 20 61 73 73 6f |ons are |not asso|
|000007c0| 63 69 61 74 65 64 20 77 | 69 74 68 20 61 6e 20 6f |ciated w|ith an o|
|000007d0| 62 6a 65 63 74 20 69 6e | 73 74 61 6e 63 65 2c 20 |bject in|stance, |
|000007e0| 63 6f 6e 73 74 0a 6f 72 | 20 6f 74 68 65 72 77 69 |const.or| otherwi|
|000007f0| 73 65 2c 20 69 74 20 6d | 61 6b 65 73 20 6e 6f 20 |se, it m|akes no |
|00000800| 73 69 6e 63 65 20 74 6f | 20 61 6c 6c 6f 77 20 74 |since to| allow t|
|00000810| 68 65 20 63 6f 6e 73 74 | 20 6d 6f 64 69 66 69 65 |he const| modifie|
|00000820| 72 20 74 6f 20 74 68 65 | 20 66 75 6e 63 74 69 6f |r to the| functio|
|00000830| 6e 0a 73 69 67 6e 61 74 | 75 72 65 2e 0a 0a 41 73 |n.signat|ure...As|
|00000840| 20 66 6f 72 20 79 6f 75 | 72 20 73 65 63 6f 6e 64 | for you|r second|
|00000850| 20 61 73 73 65 72 74 69 | 6f 6e 2c 20 74 68 65 20 | asserti|on, the |
|00000860| 76 61 72 69 61 62 6c 65 | 20 6d 75 73 74 20 62 65 |variable| must be|
|00000870| 20 64 65 63 6c 61 72 65 | 64 20 73 6f 6d 65 77 68 | declare|d somewh|
|00000880| 65 72 65 2c 20 61 6e 64 | 0a 74 68 65 20 69 6d 70 |ere, and|.the imp|
|00000890| 6c 65 6d 65 6e 74 6f 72 | 20 6f 66 20 74 68 65 20 |lementor| of the |
|000008a0| 63 6c 61 73 73 20 73 68 | 6f 75 6c 64 20 70 72 6f |class sh|ould pro|
|000008b0| 70 65 72 6c 79 20 62 65 | 20 74 68 65 20 6f 6e 65 |perly be| the one|
|000008c0| 20 74 6f 20 64 6f 20 73 | 6f 2e 20 41 73 0a 63 6f | to do s|o. As.co|
|000008d0| 6d 70 69 6c 65 72 73 20 | 64 6f 6e 27 74 20 63 75 |mpilers |don't cu|
|000008e0| 72 72 65 6e 74 6c 79 20 | 73 63 61 6e 20 61 63 72 |rrently |scan acr|
|000008f0| 6f 73 73 20 6d 75 6c 74 | 69 70 6c 65 20 73 6f 75 |oss mult|iple sou|
|00000900| 72 63 65 73 2c 20 69 74 | 20 69 73 20 70 72 6f 70 |rces, it| is prop|
|00000910| 65 72 6c 79 20 6c 65 66 | 74 0a 74 6f 20 74 68 65 |erly lef|t.to the|
|00000920| 20 6c 69 6e 6b 65 72 20 | 74 6f 20 74 65 6c 6c 20 | linker |to tell |
|00000930| 79 6f 75 20 74 68 61 74 | 20 74 68 65 20 76 61 72 |you that| the var|
|00000940| 69 61 62 6c 65 20 69 73 | 20 6d 75 6c 74 69 70 6c |iable is| multipl|
|00000950| 79 20 64 65 66 69 6e 65 | 64 2e 20 50 72 61 63 74 |y define|d. Pract|
|00000960| 69 63 61 6c 6c 79 0a 73 | 70 65 61 6b 69 6e 67 2c |ically.s|peaking,|
|00000970| 20 62 65 63 61 75 73 65 | 20 74 68 65 20 76 61 6c | because| the val|
|00000980| 75 65 20 6d 69 67 68 74 | 20 63 6f 6d 65 20 73 75 |ue might| come su|
|00000990| 70 70 6c 69 65 64 20 69 | 6e 20 61 20 6c 69 62 72 |pplied i|n a libr|
|000009a0| 61 72 79 2c 20 49 20 64 | 6f 6e 27 74 20 6b 6e 6f |ary, I d|on't kno|
|000009b0| 77 0a 68 6f 77 20 69 74 | 20 63 6f 75 6c 64 20 62 |w.how it| could b|
|000009c0| 65 20 64 6f 6e 65 20 6f | 74 68 65 72 77 69 73 65 |e done o|therwise|
|000009d0| 2e 0a 0a 2d 42 72 69 61 | 6e 20 3a 2d 29 0a 2d 2d |...-Bria|n :-).--|
|000009e0| 20 0a 42 72 69 61 6e 20 | 46 2e 20 4c 65 61 63 68 | .Brian |F. Leach|
|000009f0| 0a 53 72 2e 20 53 79 73 | 74 65 6d 73 20 41 6e 61 |.Sr. Sys|tems Ana|
|00000a00| 6c 79 73 74 0a 6c 61 73 | 62 66 6c 40 61 61 69 2e |lyst.las|bfl@aai.|
|00000a10| 61 72 63 6f 2e 63 6f 6d | 0a 0a 54 65 6c 65 70 68 |arco.com|..Teleph|
|00000a20| 6f 6e 65 3a 09 28 39 30 | 37 29 20 32 36 33 2d 34 |one:.(90|7) 263-4|
|00000a30| 38 36 30 0a 46 41 58 3a | 09 09 28 39 30 37 29 20 |860.FAX:|..(907) |
|00000a40| 32 36 35 2d 36 32 39 38 | 0a 0a 41 52 43 4f 20 41 |265-6298|..ARCO A|
|00000a50| 6c 61 73 6b 61 2c 20 49 | 6e 63 2e 0a 41 54 4f 2d |laska, I|nc..ATO-|
|00000a60| 31 36 35 36 0a 50 2e 4f | 2e 20 42 6f 78 20 31 30 |1656.P.O|. Box 10|
|00000a70| 30 33 36 30 0a 41 6e 63 | 68 6f 72 61 67 65 2c 20 |0360.Anc|horage, |
|00000a80| 41 4b 20 39 39 35 31 30 | 2d 30 33 36 30 0a 0a |AK 99510|-0360.. |
+--------+-------------------------+-------------------------+--------+--------+